<?php

class Config_Xml_Cache extends Zend_Config_Xml 
{
	/**
	 * Handles parameters reading magically.
	 *
	 * @param string $name  Property name.
	 * @return mixed
	 */
	public function __get($name)
	{
		$cacheSlot = new Cache_Slot_Array($name);
		$data = $cacheSlot->load();
		if (false === $data) {
			$key = $this->get($name);
			$cacheSlot->save($key);
			$cacheSlot->addTag(new Cache_Tag_Config());
		} else {
			$key = $data;
		}
		return $key;
		
	}	
}